<template>
  <div class="m-25 mt-65 agora">
    <div class="normal-box-mod">
      <div class="normal-box-hd clearfix">
        <div class="normal-box-title">
          <div class="decorate-square"></div>
          <h2>意见反馈</h2>
        </div>
      </div>
      
      <div class="normal-box-bd">
        <div class="normal-list-page-mod">
          <div class="normal-list-page-bd">
            <Table border :loading="list.loading" :columns="list.columns" :data="list.tableData"></Table>
          </div>
          <div>
            <Page :total="queryData.totalRecord" :page-size="queryData.pageSize" :current="queryData.page" show-total
              show-elevator @on-change="changePage"></Page>
            <!-- <span style="float: right;">共{{queryData.totalRecord}}条数据</span> -->
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import gcDispenserApi from "@/api/base_sys/gcDispenser.js";
import {Message} from "iview";

export default {
    data() {
        return {
          url: '/api/voOpinion/list',

          list: {
            loading: false,
            selections: [],
            // 列表展示数据
            tableData: [],
            columns: [
            {
              title: "反馈内容",
              key: "content",
              align: "center",
              minWidth: 80
            },
            {
              title: "联系电话",
              key: "phone",
              align: "center",
              minWidth: 100,
            },
            {
              title: "反馈时间",
              key: "insertTime",
              align: "center",
              minWidth:100,
            }
            
          ],

          },
          
          // 页面查询数据
          queryData: {
            limit: 10,
            page: 1,
            totalRecord: 0,
            forwarder: '', // 发送者
            recipient: '', // 接收者
          },

            
            
        }
    },
    created() {
        this.getTableData();
    },
    methods: {
      // 获取列表
      async getTableData() {
        console.log(this.queryData);
        this.queryData.totalRecord = undefined;
        let result = await gcDispenserApi.getData(this.url,this.queryData)
        console.log('result:',result);
        this.list.tableData = result.data;
        this.queryData.totalRecord = result.data.length;
        this.queryData.limit = result.data.pageSize;
      },
      // 分页切换
      changepage(index) {
        this.queryData.page = index;
        this.getList();
      },
      //查询
      inQuire() {
		    this.queryData.page=1;
        this.getTableData();
      },
    }
}
</script>
<style lang="less" scoped>
</style>